3.12.15 \(\int \frac {(A+B x) (d+e x)}{a+b x} \, dx\) [1115]

Optimal. Leaf size=59 \[ \frac {B (b d-a e) x}{b^2}+\frac {e (A+B x)^2}{2 b B}+\frac {(A b-a B) (b d-a e) \log (a+b x)}{b^3} \]

[Out]

B*(-a*e+b*d)*x/b^2+1/2*e*(B*x+A)^2/b/B+(A*b-B*a)*(-a*e+b*d)*ln(b*x+a)/b^3

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {78} \begin {gather*} \frac {(A b-a B) (b d-a e) \log (a+b x)}{b^3}+\frac {B x (b d-a e)}{b^2}+\frac {e (A+B x)^2}{2 b B} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(d + e*x))/(a + b*x),x]

[Out]

(B*(b*d - a*e)*x)/b^2 + (e*(A + B*x)^2)/(2*b*B) + ((A*b - a*B)*(b*d - a*e)*Log[a + b*x])/b^3

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin {align*} \int \frac {(A+B x) (d+e x)}{a+b x} \, dx &=\int \left (\frac {B (b d-a e)}{b^2}+\frac {(A b-a B) (b d-a e)}{b^2 (a+b x)}+\frac {e (A+B x)}{b}\right ) \, dx\\ &=\frac {B (b d-a e) x}{b^2}+\frac {e (A+B x)^2}{2 b B}+\frac {(A b-a B) (b d-a e) \log (a+b x)}{b^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 56, normalized size = 0.95 \begin {gather*} \frac {b x (-2 a B e+b (2 B d+2 A e+B e x))+2 (A b-a B) (b d-a e) \log (a+b x)}{2 b^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(d + e*x))/(a + b*x),x]

[Out]

(b*x*(-2*a*B*e + b*(2*B*d + 2*A*e + B*e*x)) + 2*(A*b - a*B)*(b*d - a*e)*Log[a + b*x])/(2*b^3)

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 66, normalized size = 1.12

method result size
default \(\frac {\frac {1}{2} B b e \,x^{2}+A b e x -B a e x +B b d x}{b^{2}}+\frac {\left (-A a b e +A \,b^{2} d +B \,a^{2} e -B a b d \right ) \ln \left (b x +a \right )}{b^{3}}\) \(66\)
norman \(\frac {\left (A b e -B a e +B b d \right ) x}{b^{2}}+\frac {B e \,x^{2}}{2 b}-\frac {\left (A a b e -A \,b^{2} d -B \,a^{2} e +B a b d \right ) \ln \left (b x +a \right )}{b^{3}}\) \(67\)
risch \(\frac {B e \,x^{2}}{2 b}+\frac {A e x}{b}-\frac {B a e x}{b^{2}}+\frac {B d x}{b}-\frac {\ln \left (b x +a \right ) A a e}{b^{2}}+\frac {\ln \left (b x +a \right ) A d}{b}+\frac {\ln \left (b x +a \right ) B \,a^{2} e}{b^{3}}-\frac {\ln \left (b x +a \right ) B a d}{b^{2}}\) \(90\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(e*x+d)/(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/b^2*(1/2*B*b*e*x^2+A*b*e*x-B*a*e*x+B*b*d*x)+(-A*a*b*e+A*b^2*d+B*a^2*e-B*a*b*d)/b^3*ln(b*x+a)

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 73, normalized size = 1.24 \begin {gather*} \frac {B b x^{2} e + 2 \, {\left (B b d - B a e + A b e\right )} x}{2 \, b^{2}} + \frac {{\left (B a^{2} e - A a b e - {\left (B a b - A b^{2}\right )} d\right )} \log \left (b x + a\right )}{b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(b*x+a),x, algorithm="maxima")

[Out]

1/2*(B*b*x^2*e + 2*(B*b*d - B*a*e + A*b*e)*x)/b^2 + (B*a^2*e - A*a*b*e - (B*a*b - A*b^2)*d)*log(b*x + a)/b^3

________________________________________________________________________________________

Fricas [A]
time = 1.06, size = 77, normalized size = 1.31 \begin {gather*} \frac {2 \, B b^{2} d x + {\left (B b^{2} x^{2} - 2 \, {\left (B a b - A b^{2}\right )} x\right )} e - 2 \, {\left ({\left (B a b - A b^{2}\right )} d - {\left (B a^{2} - A a b\right )} e\right )} \log \left (b x + a\right )}{2 \, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(b*x+a),x, algorithm="fricas")

[Out]

1/2*(2*B*b^2*d*x + (B*b^2*x^2 - 2*(B*a*b - A*b^2)*x)*e - 2*((B*a*b - A*b^2)*d - (B*a^2 - A*a*b)*e)*log(b*x + a
))/b^3

________________________________________________________________________________________

Sympy [A]
time = 0.15, size = 53, normalized size = 0.90 \begin {gather*} \frac {B e x^{2}}{2 b} + x \left (\frac {A e}{b} - \frac {B a e}{b^{2}} + \frac {B d}{b}\right ) + \frac {\left (- A b + B a\right ) \left (a e - b d\right ) \log {\left (a + b x \right )}}{b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(b*x+a),x)

[Out]

B*e*x**2/(2*b) + x*(A*e/b - B*a*e/b**2 + B*d/b) + (-A*b + B*a)*(a*e - b*d)*log(a + b*x)/b**3

________________________________________________________________________________________

Giac [A]
time = 1.44, size = 74, normalized size = 1.25 \begin {gather*} \frac {B b x^{2} e + 2 \, B b d x - 2 \, B a x e + 2 \, A b x e}{2 \, b^{2}} - \frac {{\left (B a b d - A b^{2} d - B a^{2} e + A a b e\right )} \log \left ({\left | b x + a \right |}\right )}{b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(b*x+a),x, algorithm="giac")

[Out]

1/2*(B*b*x^2*e + 2*B*b*d*x - 2*B*a*x*e + 2*A*b*x*e)/b^2 - (B*a*b*d - A*b^2*d - B*a^2*e + A*a*b*e)*log(abs(b*x
+ a))/b^3

________________________________________________________________________________________

Mupad [B]
time = 1.10, size = 68, normalized size = 1.15 \begin {gather*} x\,\left (\frac {A\,e+B\,d}{b}-\frac {B\,a\,e}{b^2}\right )+\frac {\ln \left (a+b\,x\right )\,\left (A\,b^2\,d+B\,a^2\,e-A\,a\,b\,e-B\,a\,b\,d\right )}{b^3}+\frac {B\,e\,x^2}{2\,b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(d + e*x))/(a + b*x),x)

[Out]

x*((A*e + B*d)/b - (B*a*e)/b^2) + (log(a + b*x)*(A*b^2*d + B*a^2*e - A*a*b*e - B*a*b*d))/b^3 + (B*e*x^2)/(2*b)

________________________________________________________________________________________